const scrollLoad = ({
  root,
  loadingComponent,
  callback
}) => {
  let observer = new IntersectionObserver(callback, {
    root
  });
  observer.observe(loadingComponent);
};

export default scrollLoad;